using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Globalization;
using PickGold.Charting;

namespace PickGold.Charting.ChartTypes
{
	internal class LineChart : PointChart
	{
		private Pen _linePen;
		private bool _processBaseChart;
		protected int allPointsLoopsNumber;
		protected int centerPointIndex;
		protected bool clipRegionSet;
		protected COPCoordinates COPCoordinatesToCheck;
		protected bool disableShadow;
		protected bool drawOutsideLines;
		protected bool drawShadowOnly;
		protected double hAxisMax;
		protected double hAxisMin;
		protected float lineTension;
		protected bool multiSeries;
		protected bool showPointLines;
		protected bool useBorderColor;
		protected double vAxisMax;
		protected double vAxisMin;

		public LineChart()
			: base(false)
		{
			this.centerPointIndex = 0x7fffffff;
			this._linePen = new Pen(Color.Black);
			this.COPCoordinatesToCheck = COPCoordinates.X;
			this.allPointsLoopsNumber = 1;
			base.middleMarker = false;
		}

		protected bool ClipBottomPoints(GraphicsPath resultPath, ref DataPoint3D firstPoint, ref DataPoint3D secondPoint, ref PointF thirdPoint, ref PointF fourthPoint, bool reversed, ChartArea area, ChartGraphics graph, Matrix3D matrix, LightStyle lightStyle, DataPoint3D prevDataPointEx, float positionZ, float depth, ArrayList points, int pointIndex, int pointLoopIndex, float tension, DrawingOperationTypes operationType, LineSegmentType surfaceSegmentType, float topDarkening, float bottomDarkening)
		{
			area.IterationCounter++;
			if (area.IterationCounter > 20)
			{
				area.IterationCounter = 0;
				return true;
			}
			int decimals = 3;
			decimal num2 = Math.Round((decimal)area.PlotAreaPosition.X, decimals);
			decimal num3 = Math.Round((decimal)area.PlotAreaPosition.Y, decimals);
			decimal num4 = Math.Round((decimal)area.PlotAreaPosition.Right, decimals);
			decimal num5 = Math.Round((decimal)area.PlotAreaPosition.Bottom, decimals);
			num2 -= 0.001M;
			num3 -= 0.001M;
			num4 += 0.001M;
			num5 += 0.001M;
			firstPoint.xPosition = Math.Round(firstPoint.xPosition, decimals);
			firstPoint.yPosition = Math.Round(firstPoint.yPosition, decimals);
			secondPoint.xPosition = Math.Round(secondPoint.xPosition, decimals);
			secondPoint.yPosition = Math.Round(secondPoint.yPosition, decimals);
			thirdPoint.X = (float)Math.Round((double)thirdPoint.X, decimals);
			thirdPoint.Y = (float)Math.Round((double)thirdPoint.Y, decimals);
			fourthPoint.X = (float)Math.Round((double)fourthPoint.X, decimals);
			fourthPoint.Y = (float)Math.Round((double)fourthPoint.Y, decimals);
			if (((((decimal)thirdPoint.Y) >= num3) && (((decimal)thirdPoint.Y) <= num5)) && ((((decimal)fourthPoint.Y) >= num3) && (((decimal)fourthPoint.Y) <= num5)))
			{
				return false;
			}
			PointF tf = new PointF(thirdPoint.X, thirdPoint.Y);
			PointF tf2 = new PointF(fourthPoint.X, fourthPoint.Y);
			bool flag = false;
			bool clippedSegment = false;
			if ((((decimal)thirdPoint.Y) < num3) && (((decimal)fourthPoint.Y) < num3))
			{
				clippedSegment = true;
				flag = true;
				thirdPoint.Y = area.PlotAreaPosition.Y;
				fourthPoint.Y = area.PlotAreaPosition.Y;
			}
			if ((((decimal)thirdPoint.Y) > num5) && (((decimal)fourthPoint.Y) > num5))
			{
				flag = true;
				thirdPoint.Y = area.PlotAreaPosition.Bottom;
				fourthPoint.Y = area.PlotAreaPosition.Bottom;
			}
			if (flag)
			{
				resultPath = this.Draw3DSurface(firstPoint, secondPoint, reversed, area, graph, matrix, lightStyle, prevDataPointEx, positionZ, depth, points, pointIndex, pointLoopIndex, tension, operationType, surfaceSegmentType, topDarkening, 0.5f, new PointF(thirdPoint.X, thirdPoint.Y), new PointF(fourthPoint.X, fourthPoint.Y), clippedSegment, false, false);
				thirdPoint = new PointF(tf.X, tf.Y);
				fourthPoint = new PointF(tf2.X, tf2.Y);
				return true;
			}
			DataPoint3D pointd = new DataPoint3D();
			bool flag3 = false;
			pointd.yPosition = (double)num3;
			if ((((decimal)thirdPoint.Y) > num5) || (((decimal)fourthPoint.Y) > num5))
			{
				pointd.yPosition = area.PlotAreaPosition.Bottom;
				flag3 = true;
			}
			pointd.xPosition = (((pointd.yPosition - fourthPoint.Y) * (thirdPoint.X - fourthPoint.X)) / ((double)(thirdPoint.Y - fourthPoint.Y))) + fourthPoint.X;
			pointd.yPosition = (((pointd.xPosition - secondPoint.xPosition) / (firstPoint.xPosition - secondPoint.xPosition)) * (firstPoint.yPosition - secondPoint.yPosition)) + secondPoint.yPosition;
			if ((!double.IsNaN(pointd.xPosition) && !double.IsInfinity(pointd.xPosition)) && (!double.IsNaN(pointd.yPosition) && !double.IsInfinity(pointd.yPosition)))
			{
				int num6 = 2;
				DataPoint3D pointd2 = null;
				bool flag4 = false;
				if (((((decimal)thirdPoint.Y) < num3) && (((decimal)fourthPoint.Y) > num5)) || ((((decimal)thirdPoint.Y) > num5) && (((decimal)fourthPoint.Y) < num3)))
				{
					num6 = 3;
					pointd2 = new DataPoint3D();
					if (!flag3)
					{
						pointd2.yPosition = area.PlotAreaPosition.Bottom;
					}
					else
					{
						pointd2.yPosition = area.PlotAreaPosition.Y;
					}
					pointd2.xPosition = (((pointd2.yPosition - fourthPoint.Y) * (thirdPoint.X - fourthPoint.X)) / ((double)(thirdPoint.Y - fourthPoint.Y))) + fourthPoint.X;
					pointd2.yPosition = (((pointd2.xPosition - secondPoint.xPosition) / (firstPoint.xPosition - secondPoint.xPosition)) * (firstPoint.yPosition - secondPoint.yPosition)) + secondPoint.yPosition;
					if ((double.IsNaN(pointd2.xPosition) || double.IsInfinity(pointd2.xPosition)) || (double.IsNaN(pointd2.yPosition) || double.IsInfinity(pointd2.yPosition)))
					{
						return true;
					}
					if (((decimal)thirdPoint.Y) > num5)
					{
						flag4 = true;
					}
				}
				bool flag5 = true;
				float num7 = bottomDarkening;
				bool flag6 = false;
				bool flag7 = false;
				if (((decimal)thirdPoint.Y) < num3)
				{
					flag6 = true;
					flag5 = false;
					thirdPoint.Y = area.PlotAreaPosition.Y;
					num7 = 0.5f;
				}
				else if (((decimal)thirdPoint.Y) > num5)
				{
					flag5 = false;
					thirdPoint.Y = area.PlotAreaPosition.Bottom;
					if (firstPoint.yPosition >= thirdPoint.Y)
					{
						num7 = 0.5f;
					}
				}
				if (((decimal)fourthPoint.Y) < num3)
				{
					flag7 = true;
					fourthPoint.Y = area.PlotAreaPosition.Y;
					num7 = 0.5f;
				}
				else if (((decimal)fourthPoint.Y) > num5)
				{
					fourthPoint.Y = area.PlotAreaPosition.Bottom;
					if (fourthPoint.Y <= secondPoint.yPosition)
					{
						num7 = 0.5f;
					}
				}
				for (int i = 0; i < 3; i++)
				{
					GraphicsPath addingPath = null;
					if (((i == 0) && !reversed) || ((i == 2) && reversed))
					{
						if (pointd2 == null)
						{
							pointd2 = pointd;
						}
						if (flag4)
						{
							DataPoint3D pointd3 = new DataPoint3D();
							pointd3.xPosition = pointd.xPosition;
							pointd3.yPosition = pointd.yPosition;
							pointd.xPosition = pointd2.xPosition;
							pointd.yPosition = pointd2.yPosition;
							pointd2.xPosition = pointd3.xPosition;
							pointd2.yPosition = pointd3.yPosition;
						}
						pointd2.dataPoint = secondPoint.dataPoint;
						pointd2.index = secondPoint.index;
						pointd2.xCenterVal = secondPoint.xCenterVal;
						addingPath = this.Draw3DSurface(firstPoint, pointd2, reversed, area, graph, matrix, lightStyle, prevDataPointEx, positionZ, depth, points, pointIndex, pointLoopIndex, tension, operationType, (surfaceSegmentType == LineSegmentType.Middle) ? LineSegmentType.Middle : LineSegmentType.First, topDarkening, num7, new PointF(float.NaN, thirdPoint.Y), new PointF((float)pointd2.xPosition, (!flag5 || (num6 == 3)) ? thirdPoint.Y : fourthPoint.Y), flag6, false, false);
						if (flag4)
						{
							DataPoint3D pointd4 = new DataPoint3D();
							pointd4.xPosition = pointd.xPosition;
							pointd4.yPosition = pointd.yPosition;
							pointd.xPosition = pointd2.xPosition;
							pointd.yPosition = pointd2.yPosition;
							pointd2.xPosition = pointd4.xPosition;
							pointd2.yPosition = pointd4.yPosition;
						}
					}
					if (((i == 1) && (pointd2 != null)) && (num6 == 3))
					{
						if (!flag4)
						{
							DataPoint3D pointd5 = new DataPoint3D();
							pointd5.xPosition = pointd.xPosition;
							pointd5.yPosition = pointd.yPosition;
							pointd.xPosition = pointd2.xPosition;
							pointd.yPosition = pointd2.yPosition;
							pointd2.xPosition = pointd5.xPosition;
							pointd2.yPosition = pointd5.yPosition;
						}
						pointd2.dataPoint = secondPoint.dataPoint;
						pointd2.index = secondPoint.index;
						pointd2.xCenterVal = secondPoint.xCenterVal;
						pointd.xCenterVal = firstPoint.xCenterVal;
						pointd.index = firstPoint.index;
						pointd.dataPoint = firstPoint.dataPoint;
						addingPath = this.Draw3DSurface(pointd, pointd2, reversed, area, graph, matrix, lightStyle, prevDataPointEx, positionZ, depth, points, pointIndex, pointLoopIndex, tension, operationType, LineSegmentType.Middle, topDarkening, bottomDarkening, new PointF((float)pointd.xPosition, thirdPoint.Y), new PointF((float)pointd2.xPosition, fourthPoint.Y), false, false, false);
						if (!flag4)
						{
							DataPoint3D pointd6 = new DataPoint3D();
							pointd6.xPosition = pointd.xPosition;
							pointd6.yPosition = pointd.yPosition;
							pointd.xPosition = pointd2.xPosition;
							pointd.yPosition = pointd2.yPosition;
							pointd2.xPosition = pointd6.xPosition;
							pointd2.yPosition = pointd6.yPosition;
						}
					}
					if (((i == 2) && !reversed) || ((i == 0) && reversed))
					{
						if (flag4)
						{
							DataPoint3D pointd7 = new DataPoint3D();
							pointd7.xPosition = pointd.xPosition;
							pointd7.yPosition = pointd.yPosition;
							pointd.xPosition = pointd2.xPosition;
							pointd.yPosition = pointd2.yPosition;
							pointd2.xPosition = pointd7.xPosition;
							pointd2.yPosition = pointd7.yPosition;
						}
						pointd.dataPoint = firstPoint.dataPoint;
						pointd.index = firstPoint.index;
						pointd.xCenterVal = firstPoint.xCenterVal;
						float y = (!flag5 || (num6 == 3)) ? thirdPoint.Y : fourthPoint.Y;
						if (num6 == 3)
						{
							y = flag7 ? thirdPoint.Y : fourthPoint.Y;
						}
						addingPath = this.Draw3DSurface(pointd, secondPoint, reversed, area, graph, matrix, lightStyle, prevDataPointEx, positionZ, depth, points, pointIndex, pointLoopIndex, tension, operationType, (surfaceSegmentType == LineSegmentType.Middle) ? LineSegmentType.Middle : LineSegmentType.Last, topDarkening, num7, new PointF((float)pointd.xPosition, y), new PointF(float.NaN, fourthPoint.Y), flag7, false, false);
						if (flag4)
						{
							DataPoint3D pointd8 = new DataPoint3D();
							pointd8.xPosition = pointd.xPosition;
							pointd8.yPosition = pointd.yPosition;
							pointd.xPosition = pointd2.xPosition;
							pointd.yPosition = pointd2.yPosition;
							pointd2.xPosition = pointd8.xPosition;
							pointd2.yPosition = pointd8.yPosition;
						}
					}
					if (((resultPath != null) && (addingPath != null)) && (addingPath.PointCount > 0))
					{
						resultPath.AddPath(addingPath, true);
					}
				}
				thirdPoint = new PointF(tf.X, tf.Y);
				fourthPoint = new PointF(tf2.X, tf2.Y);
			}
			return true;
		}

		protected bool ClipTopPoints(GraphicsPath resultPath, ref DataPoint3D firstPoint, ref DataPoint3D secondPoint, bool reversed, ChartArea area, ChartGraphics graph, Matrix3D matrix, LightStyle lightStyle, DataPoint3D prevDataPointEx, float positionZ, float depth, ArrayList points, int pointIndex, int pointLoopIndex, float tension, DrawingOperationTypes operationType, LineSegmentType surfaceSegmentType, float topDarkening, float bottomDarkening)
		{
			area.IterationCounter++;
			if (area.IterationCounter > 20)
			{
				area.IterationCounter = 0;
				return true;
			}
			if ((!double.IsNaN(firstPoint.xPosition) && !double.IsNaN(firstPoint.yPosition)) && (!double.IsNaN(secondPoint.xPosition) && !double.IsNaN(secondPoint.yPosition)))
			{
				int decimals = 3;
				decimal num2 = Math.Round((decimal)area.PlotAreaPosition.X, decimals);
				decimal num3 = Math.Round((decimal)area.PlotAreaPosition.Y, decimals);
				decimal num4 = Math.Round((decimal)area.PlotAreaPosition.Right, decimals);
				decimal num5 = Math.Round((decimal)area.PlotAreaPosition.Bottom, decimals);
				num2 -= 0.001M;
				num3 -= 0.001M;
				num4 += 0.001M;
				num5 += 0.001M;
				firstPoint.xPosition = Math.Round(firstPoint.xPosition, decimals);
				firstPoint.yPosition = Math.Round(firstPoint.yPosition, decimals);
				secondPoint.xPosition = Math.Round(secondPoint.xPosition, decimals);
				secondPoint.yPosition = Math.Round(secondPoint.yPosition, decimals);
				if (((((decimal)firstPoint.xPosition) < num2) || (((decimal)firstPoint.xPosition) > num4)) || ((((decimal)secondPoint.xPosition) < num2) || (((decimal)secondPoint.xPosition) > num4)))
				{
					if ((((decimal)firstPoint.xPosition) < num2) && (((decimal)secondPoint.xPosition) < num2))
					{
						return true;
					}
					if ((((decimal)firstPoint.xPosition) > num4) && (((decimal)secondPoint.xPosition) > num4))
					{
						return true;
					}
					if (((decimal)firstPoint.xPosition) < num2)
					{
						firstPoint.yPosition = (((((double)num2) - secondPoint.xPosition) / (firstPoint.xPosition - secondPoint.xPosition)) * (firstPoint.yPosition - secondPoint.yPosition)) + secondPoint.yPosition;
						firstPoint.xPosition = (double)num2;
					}
					else if (((decimal)firstPoint.xPosition) > num4)
					{
						firstPoint.yPosition = (((((double)num4) - secondPoint.xPosition) / (firstPoint.xPosition - secondPoint.xPosition)) * (firstPoint.yPosition - secondPoint.yPosition)) + secondPoint.yPosition;
						firstPoint.xPosition = (double)num4;
					}
					if (((decimal)secondPoint.xPosition) < num2)
					{
						secondPoint.yPosition = (((((double)num2) - secondPoint.xPosition) / (firstPoint.xPosition - secondPoint.xPosition)) * (firstPoint.yPosition - secondPoint.yPosition)) + secondPoint.yPosition;
						secondPoint.xPosition = (double)num2;
					}
					else if (((decimal)secondPoint.xPosition) > num4)
					{
						secondPoint.yPosition = (((((double)num4) - secondPoint.xPosition) / (firstPoint.xPosition - secondPoint.xPosition)) * (firstPoint.yPosition - secondPoint.yPosition)) + secondPoint.yPosition;
						secondPoint.xPosition = (double)num4;
					}
				}
				if (((((decimal)firstPoint.yPosition) >= num3) && (((decimal)firstPoint.yPosition) <= num5)) && ((((decimal)secondPoint.yPosition) >= num3) && (((decimal)secondPoint.yPosition) <= num5)))
				{
					return false;
				}
				double yPosition = firstPoint.yPosition;
				double num7 = secondPoint.yPosition;
				bool flag = false;
				bool clippedSegment = false;
				if ((((decimal)firstPoint.yPosition) < num3) && (((decimal)secondPoint.yPosition) < num3))
				{
					flag = true;
					firstPoint.yPosition = (double)num3;
					secondPoint.yPosition = (double)num3;
				}
				if ((((decimal)firstPoint.yPosition) > num5) && (((decimal)secondPoint.yPosition) > num5))
				{
					flag = true;
					clippedSegment = true;
					firstPoint.yPosition = (double)num5;
					secondPoint.yPosition = (double)num5;
				}
				if (flag)
				{
					resultPath = this.Draw3DSurface(firstPoint, secondPoint, reversed, area, graph, matrix, lightStyle, prevDataPointEx, positionZ, depth, points, pointIndex, pointLoopIndex, tension, operationType, surfaceSegmentType, 0.5f, 0f, new PointF(float.NaN, float.NaN), new PointF(float.NaN, float.NaN), clippedSegment, false, true);
					firstPoint.yPosition = yPosition;
					secondPoint.yPosition = num7;
					return true;
				}
				DataPoint3D pointd = new DataPoint3D();
				pointd.yPosition = (double)num3;
				if ((((decimal)firstPoint.yPosition) > num5) || (((decimal)secondPoint.yPosition) > num5))
				{
					pointd.yPosition = (double)num5;
				}
				pointd.xPosition = (((pointd.yPosition - secondPoint.yPosition) * (firstPoint.xPosition - secondPoint.xPosition)) / (firstPoint.yPosition - secondPoint.yPosition)) + secondPoint.xPosition;
				if ((double.IsNaN(pointd.xPosition) || double.IsInfinity(pointd.xPosition)) || (double.IsNaN(pointd.yPosition) || double.IsInfinity(pointd.yPosition)))
				{
					return true;
				}
				int num8 = 2;
				DataPoint3D pointd2 = null;
				if (((((decimal)firstPoint.yPosition) < num3) && (((decimal)secondPoint.yPosition) > num5)) || ((((decimal)firstPoint.yPosition) > num5) && (((decimal)secondPoint.yPosition) < num3)))
				{
					num8 = 3;
					pointd2 = new DataPoint3D();
					if (((decimal)pointd.yPosition) == num3)
					{
						pointd2.yPosition = (double)num5;
					}
					else
					{
						pointd2.yPosition = (double)num3;
					}
					pointd2.xPosition = (((pointd2.yPosition - secondPoint.yPosition) * (firstPoint.xPosition - secondPoint.xPosition)) / (firstPoint.yPosition - secondPoint.yPosition)) + secondPoint.xPosition;
					if ((double.IsNaN(pointd2.xPosition) || double.IsInfinity(pointd2.xPosition)) || (double.IsNaN(pointd2.yPosition) || double.IsInfinity(pointd2.yPosition)))
					{
						return true;
					}
					if (((decimal)firstPoint.yPosition) > num5)
					{
						DataPoint3D pointd3 = new DataPoint3D();
						pointd3.xPosition = pointd.xPosition;
						pointd3.yPosition = pointd.yPosition;
						pointd.xPosition = pointd2.xPosition;
						pointd.yPosition = pointd2.yPosition;
						pointd2.xPosition = pointd3.xPosition;
						pointd2.yPosition = pointd3.yPosition;
					}
				}
				bool flag3 = true;
				bool flag4 = false;
				bool flag5 = false;
				if (((decimal)firstPoint.yPosition) < num3)
				{
					flag3 = false;
					firstPoint.yPosition = (double)num3;
				}
				else if (((decimal)firstPoint.yPosition) > num5)
				{
					flag4 = true;
					flag3 = false;
					firstPoint.yPosition = (double)num5;
				}
				if (((decimal)secondPoint.yPosition) < num3)
				{
					secondPoint.yPosition = (double)num3;
				}
				else if (((decimal)secondPoint.yPosition) > num5)
				{
					flag5 = true;
					secondPoint.yPosition = (double)num5;
				}
				for (int i = 0; i < 3; i++)
				{
					GraphicsPath addingPath = null;
					if (((i == 0) && !reversed) || ((i == 2) && reversed))
					{
						if (pointd2 == null)
						{
							pointd2 = pointd;
						}
						pointd2.dataPoint = secondPoint.dataPoint;
						pointd2.index = secondPoint.index;
						pointd2.xCenterVal = secondPoint.xCenterVal;
						addingPath = this.Draw3DSurface(firstPoint, pointd2, reversed, area, graph, matrix, lightStyle, prevDataPointEx, positionZ, depth, points, pointIndex, pointLoopIndex, tension, operationType, (surfaceSegmentType == LineSegmentType.Middle) ? LineSegmentType.Middle : LineSegmentType.First, (flag3 && (num8 != 3)) ? 0f : 0.5f, 0f, new PointF(float.NaN, float.NaN), new PointF((float)pointd2.xPosition, float.NaN), flag4, false, true);
					}
					if (((i == 1) && (pointd2 != null)) && (num8 == 3))
					{
						pointd2.dataPoint = secondPoint.dataPoint;
						pointd2.index = secondPoint.index;
						pointd2.xCenterVal = secondPoint.xCenterVal;
						pointd.xCenterVal = firstPoint.xCenterVal;
						pointd.index = firstPoint.index;
						pointd.dataPoint = firstPoint.dataPoint;
						addingPath = this.Draw3DSurface(pointd, pointd2, reversed, area, graph, matrix, lightStyle, prevDataPointEx, positionZ, depth, points, pointIndex, pointLoopIndex, tension, operationType, LineSegmentType.Middle, topDarkening, bottomDarkening, new PointF((float)pointd.xPosition, float.NaN), new PointF((float)pointd2.xPosition, float.NaN), false, false, true);
					}
					if (((i == 2) && !reversed) || ((i == 0) && reversed))
					{
						pointd.dataPoint = firstPoint.dataPoint;
						pointd.index = firstPoint.index;
						pointd.xCenterVal = firstPoint.xCenterVal;
						addingPath = this.Draw3DSurface(pointd, secondPoint, reversed, area, graph, matrix, lightStyle, prevDataPointEx, positionZ, depth, points, pointIndex, pointLoopIndex, tension, operationType, (surfaceSegmentType == LineSegmentType.Middle) ? LineSegmentType.Middle : LineSegmentType.Last, (!flag3 && (num8 != 3)) ? 0f : 0.5f, 0f, new PointF((float)pointd.xPosition, float.NaN), new PointF(float.NaN, float.NaN), flag5, false, true);
					}
					if (((resultPath != null) && (addingPath != null)) && (addingPath.PointCount > 0))
					{
						resultPath.AddPath(addingPath, true);
					}
				}
				firstPoint.yPosition = yPosition;
				secondPoint.yPosition = num7;
			}
			return true;
		}

		protected override void Dispose(bool disposing)
		{
			if (disposing && (this._linePen != null))
			{
				this._linePen.Dispose();
				this._linePen = null;
			}
			base.Dispose(disposing);
		}

		protected virtual GraphicsPath Draw3DSurface(ChartArea area, ChartGraphics graph, Matrix3D matrix, LightStyle lightStyle, DataPoint3D prevDataPointEx, float positionZ, float depth, ArrayList points, int pointIndex, int pointLoopIndex, float tension, DrawingOperationTypes operationType, float topDarkening, float bottomDarkening, PointF thirdPointPosition, PointF fourthPointPosition, bool clippedSegment)
		{
			if (this.centerPointIndex == 0x7fffffff)
			{
				this.centerPointIndex = this.GetCenterPointIndex(points);
			}
			DataPoint3D secondPoint = (DataPoint3D)points[pointIndex];
			int neighborPointIndex = pointIndex;
			DataPoint3D firstPoint = ChartGraphics.FindPointByIndex(points, secondPoint.index - 1, this.multiSeries ? secondPoint : null, ref neighborPointIndex);
			DataPoint3D pointd3 = secondPoint;
			if (prevDataPointEx.dataPoint.IsEmpty)
			{
				pointd3 = prevDataPointEx;
			}
			else if (firstPoint.index > secondPoint.index)
			{
				pointd3 = firstPoint;
			}
			Color backColor = this.useBorderColor ? pointd3.dataPoint.BorderColor : pointd3.dataPoint.Color;
			ChartDashStyle borderDashStyle = pointd3.dataPoint.BorderDashStyle;
			if (pointd3.dataPoint.IsEmpty && (pointd3.dataPoint.Color == Color.Empty))
			{
				backColor = Color.Gray;
			}
			if (pointd3.dataPoint.IsEmpty && (pointd3.dataPoint.BorderDashStyle == ChartDashStyle.NotSet))
			{
				borderDashStyle = ChartDashStyle.Solid;
			}
			return graph.Draw3DSurface(area, matrix, lightStyle, SurfaceNames.Top, positionZ, depth, backColor, pointd3.dataPoint.BorderColor, pointd3.dataPoint.BorderWidth, borderDashStyle, firstPoint, secondPoint, points, pointIndex, tension, operationType, LineSegmentType.Single, this.showPointLines, false, area.ReverseSeriesOrder, this.multiSeries, 0, true);
		}

		protected virtual GraphicsPath Draw3DSurface(DataPoint3D firstPoint, DataPoint3D secondPoint, bool reversed, ChartArea area, ChartGraphics graph, Matrix3D matrix, LightStyle lightStyle, DataPoint3D prevDataPointEx, float positionZ, float depth, ArrayList points, int pointIndex, int pointLoopIndex, float tension, DrawingOperationTypes operationType, LineSegmentType surfaceSegmentType, float topDarkening, float bottomDarkening, PointF thirdPointPosition, PointF fourthPointPosition, bool clippedSegment, bool clipOnTop, bool clipOnBottom)
		{
			return null;
		}

		protected void DrawLine(ChartGraphics graph, DataPoint point, Series series, PointF firstPoint, PointF secondPoint)
		{
			graph.DrawLineRel(point.Color, point.BorderWidth, point.BorderDashStyle, firstPoint, secondPoint, series.ShadowColor, series.ShadowOffset);
		}

		protected virtual void DrawLine(ChartGraphics graph, CommonElements common, DataPoint point, Series series, PointF[] points, int pointIndex, float tension)
		{
			int borderWidth = point.BorderWidth;
			if (common.ProcessModePaint && (pointIndex > 0))
			{
				Color color = this.useBorderColor ? point.BorderColor : point.Color;
				ChartDashStyle borderDashStyle = point.BorderDashStyle;
				if (((!this.disableShadow && (series.ShadowOffset != 0)) && ((series.ShadowColor != Color.Empty) && (color != Color.Empty))) && (((color != Color.Transparent) && (borderWidth > 0)) && (borderDashStyle != ChartDashStyle.NotSet)))
				{
					Pen pen = new Pen((series.ShadowColor.A != 0xff) ? series.ShadowColor : Color.FromArgb(this.useBorderColor ? (point.BorderColor.A / 2) : (point.Color.A / 2), series.ShadowColor), (float)borderWidth);
					pen.DashStyle = graph.GetPenStyle(point.BorderDashStyle);
					pen.StartCap = LineCap.Round;
					pen.EndCap = LineCap.Round;
					GraphicsState gstate = graph.Save();
					Matrix matrix = graph.Transform.Clone();
					matrix.Translate((float)series.ShadowOffset, (float)series.ShadowOffset);
					graph.Transform = matrix;
					if (this.lineTension == 0f)
					{
						try
						{
							graph.DrawLine(pen, points[pointIndex - 1], points[pointIndex]);
						}
						catch (OverflowException)
						{
							this.DrawTruncatedLine(graph, pen, points[pointIndex - 1], points[pointIndex]);
						}
					}
					else
					{
						graph.DrawCurve(pen, points, pointIndex - 1, 1, tension);
					}
					graph.Restore(gstate);
				}
				if (this.drawShadowOnly)
				{
					return;
				}
				if (((color != Color.Empty) && (borderWidth > 0)) && (borderDashStyle != ChartDashStyle.NotSet))
				{
					if (this._linePen.Color != color)
					{
						this._linePen.Color = color;
					}
					if (this._linePen.Width != borderWidth)
					{
						this._linePen.Width = borderWidth;
					}
					if (this._linePen.DashStyle != graph.GetPenStyle(borderDashStyle))
					{
						this._linePen.DashStyle = graph.GetPenStyle(borderDashStyle);
					}
					if (this._linePen.StartCap != LineCap.Round)
					{
						this._linePen.StartCap = LineCap.Round;
					}
					if (this._linePen.EndCap != LineCap.Round)
					{
						this._linePen.EndCap = LineCap.Round;
					}
					if (tension == 0f)
					{
						try
						{
							graph.DrawLine(this._linePen, points[pointIndex - 1], points[pointIndex]);
						}
						catch (OverflowException)
						{
							this.DrawTruncatedLine(graph, this._linePen, points[pointIndex - 1], points[pointIndex]);
						}
					}
					else
					{
						graph.DrawCurve(this._linePen, points, pointIndex - 1, 1, tension);
					}
				}
			}
			if (common.ProcessModeRegions)
			{
				int num2 = borderWidth + 2;
				using (GraphicsPath path = new GraphicsPath())
				{
					if (this.lineTension == 0f)
					{
						if (pointIndex > 0)
						{
							PointF tf = points[pointIndex - 1];
							PointF tf2 = points[pointIndex];
							tf.X = (tf.X + tf2.X) / 2f;
							tf.Y = (tf.Y + tf2.Y) / 2f;
							if (Math.Abs((float)(tf.X - tf2.X)) > Math.Abs((float)(tf.Y - tf2.Y)))
							{
								path.AddLine(tf.X, tf.Y - num2, tf2.X, tf2.Y - num2);
								path.AddLine(tf2.X, tf2.Y + num2, tf.X, tf.Y + num2);
								path.CloseAllFigures();
							}
							else
							{
								path.AddLine(tf.X - num2, tf.Y, tf2.X - num2, tf2.Y);
								path.AddLine(tf2.X + num2, tf2.Y, tf.X + num2, tf.Y);
								path.CloseAllFigures();
							}
						}
						if ((pointIndex + 1) < points.Length)
						{
							PointF tf3 = points[pointIndex];
							PointF tf4 = points[pointIndex + 1];
							tf4.X = (tf3.X + tf4.X) / 2f;
							tf4.Y = (tf3.Y + tf4.Y) / 2f;
							if (pointIndex > 0)
							{
								path.SetMarkers();
							}
							if (Math.Abs((float)(tf3.X - tf4.X)) > Math.Abs((float)(tf3.Y - tf4.Y)))
							{
								path.AddLine(tf3.X, tf3.Y - num2, tf4.X, tf4.Y - num2);
								path.AddLine(tf4.X, tf4.Y + num2, tf3.X, tf3.Y + num2);
								path.CloseAllFigures();
							}
							else
							{
								path.AddLine(tf3.X - num2, tf3.Y, tf4.X - num2, tf4.Y);
								path.AddLine(tf4.X + num2, tf4.Y, tf3.X + num2, tf3.Y);
								path.CloseAllFigures();
							}
						}
					}
					else if (pointIndex > 0)
					{
						try
						{
							path.AddCurve(points, pointIndex - 1, 1, this.lineTension);
							path.Widen(new Pen(point.Color, (float)(borderWidth + 2)));
							path.Flatten();
						}
						catch (OutOfMemoryException)
						{
						}
						catch (ArgumentException)
						{
						}
					}
					if (path.PointCount != 0)
					{
						PointF empty = PointF.Empty;
						float[] coord = new float[path.PointCount * 2];
						PointF[] pathPoints = path.PathPoints;
						for (int i = 0; i < path.PointCount; i++)
						{
							empty = graph.GetRelativePoint(pathPoints[i]);
							coord[2 * i] = empty.X;
							coord[(2 * i) + 1] = empty.Y;
						}
						common.HotRegionsList.AddHotRegion(path, false, coord, point, series.Name, pointIndex);
					}
				}
			}
		}

		private void DrawTruncatedLine(ChartGraphics graph, Pen pen, PointF pt1, PointF pt2)
		{
			PointF empty = PointF.Empty;
			PointF tf2 = PointF.Empty;
			if (Math.Abs((float)(pt2.Y - pt1.Y)) > Math.Abs((float)(pt2.X - pt1.X)))
			{
				empty = GetIntersectionY(pt1, pt2, 0f);
				tf2 = GetIntersectionY(pt1, pt2, (float)graph.Common.ChartPicture.Height);
			}
			else
			{
				empty = GetIntersectionX(pt1, pt2, 0f);
				tf2 = GetIntersectionX(pt1, pt2, (float)graph.Common.ChartPicture.Width);
			}
			graph.DrawLine(pen, empty, tf2);
		}

		protected override LabelAlignmentStyles GetAutoLabelPosition(Series series, int pointIndex)
		{
			int count = series.Points.Count;
			if (count != 1)
			{
				double num4 = this.GetYValue(base.Common, base.Area, series, series.Points[pointIndex], pointIndex, 0);
				if ((pointIndex < (count - 1)) && (pointIndex > 0))
				{
					double num2 = this.GetYValue(base.Common, base.Area, series, series.Points[pointIndex - 1], pointIndex - 1, 0);
					double num3 = this.GetYValue(base.Common, base.Area, series, series.Points[pointIndex + 1], pointIndex + 1, 0);
					if ((num2 > num4) && (num3 > num4))
					{
						return LabelAlignmentStyles.Bottom;
					}
				}
				if ((pointIndex == (count - 1)) && (this.GetYValue(base.Common, base.Area, series, series.Points[pointIndex - 1], pointIndex - 1, 0) > num4))
				{
					return LabelAlignmentStyles.Bottom;
				}
				if ((pointIndex == 0) && (this.GetYValue(base.Common, base.Area, series, series.Points[pointIndex + 1], pointIndex + 1, 0) > num4))
				{
					return LabelAlignmentStyles.Bottom;
				}
			}
			return LabelAlignmentStyles.Top;
		}

		protected int GetCenterPointIndex(ArrayList points)
		{
			for (int i = 1; i < points.Count; i++)
			{
				DataPoint3D pointd = (DataPoint3D)points[i - 1];
				DataPoint3D pointd2 = (DataPoint3D)points[i];
				if (Math.Abs((int)(pointd2.index - pointd.index)) != 1)
				{
					return (i - 1);
				}
			}
			return 0x7fffffff;
		}

		protected virtual float GetDefaultTension()
		{
			return 0f;
		}

		public override Image GetImage(ChartTypeRegistry registry)
		{
			return (Image)registry.ResourceManager.GetObject(this.Name + "ChartType");
		}

		internal static PointF GetIntersectionX(PointF firstPoint, PointF secondPoint, float pointX)
		{
			PointF tf = new PointF();
			tf.X = pointX;
			tf.Y = (((pointX - firstPoint.X) * (secondPoint.Y - firstPoint.Y)) / (secondPoint.X - firstPoint.X)) + firstPoint.Y;
			return tf;
		}

		internal static PointF GetIntersectionY(PointF firstPoint, PointF secondPoint, float pointY)
		{
			PointF tf = new PointF();
			tf.Y = pointY;
			tf.X = (((pointY - firstPoint.Y) * (secondPoint.X - firstPoint.X)) / (secondPoint.Y - firstPoint.Y)) + firstPoint.X;
			return tf;
		}

		public override LegendImageStyle GetLegendImageStyle(Series series)
		{
			return LegendImageStyle.Line;
		}

		protected virtual int GetPointLoopNumber(bool selection, ArrayList pointsArray)
		{
			return 1;
		}

		protected virtual PointF[] GetPointsPosition(ChartGraphics graph, Series series, bool indexedSeries)
		{
			PointF[] tfArray = new PointF[series.Points.Count];
			int pointIndex = 0;
			foreach (DataPoint point in series.Points)
			{
				double axisValue = this.GetYValue(base.Common, base.Area, series, point, pointIndex, base.YValueIndex);
				double position = base.VAxis.GetPosition(axisValue);
				double num4 = base.HAxis.GetPosition(point.XValue);
				if (indexedSeries)
				{
					num4 = base.HAxis.GetPosition((double)(pointIndex + 1));
				}
				tfArray[pointIndex] = new PointF((((float)num4) * (graph.Common.ChartPicture.Width - 1)) / 100f, (((float)position) * (graph.Common.ChartPicture.Height - 1)) / 100f);
				pointIndex++;
			}
			return tfArray;
		}

		protected virtual bool IsLineTensionSupported()
		{
			return false;
		}

		public override void Paint(ChartGraphics graph, CommonElements common, ChartArea area, Series seriesToDraw)
		{
			base.Area = area;
			base.Common = common;
			this._processBaseChart = false;
			this.ProcessChartType(false, graph, common, area, seriesToDraw);
			if (this._processBaseChart)
			{
				base.ProcessChartType(false, graph, common, area, seriesToDraw);
			}
		}

		protected override void ProcessChartType(bool selection, ChartGraphics graph, CommonElements common, ChartArea area, Series seriesToDraw)
		{
			base.Common = common;
			if (area.Area3DStyle.Enable3D)
			{
				this._processBaseChart = true;
				this.ProcessLineChartType3D(selection, graph, common, area, seriesToDraw);
			}
			else
			{
				bool indexedSeries = ChartHelper.IndexedSeries(base.Common, area.GetSeriesFromChartType(this.Name).ToArray());
				foreach (Series series in common.DataManager.Series)
				{
					if ((((string.Compare(series.ChartTypeName, this.Name, true, CultureInfo.CurrentCulture) != 0) || (series.ChartArea != area.Name)) || !series.IsVisible()) || ((seriesToDraw != null) && (seriesToDraw.Name != series.Name)))
					{
						continue;
					}
					base.HAxis = area.GetAxis(AxisName.X, series.XAxisType, series.XSubAxisName);
					base.VAxis = area.GetAxis(AxisName.Y, series.YAxisType, series.YSubAxisName);
					this.hAxisMin = base.HAxis.ViewMinimum;
					this.hAxisMax = base.HAxis.ViewMaximum;
					this.vAxisMin = base.VAxis.ViewMinimum;
					this.vAxisMax = base.VAxis.ViewMaximum;
					float num = ((float)(graph.Common.ChartPicture.Width - 1)) / 100f;
					float num2 = ((float)(graph.Common.ChartPicture.Height - 1)) / 100f;
					if (!selection)
					{
						common.Chart.CallOnPrePaint(new ChartPaintEventArgs(series, graph, common, area.PlotAreaPosition));
					}
					this.lineTension = this.GetDefaultTension();
					if (this.IsLineTensionSupported() && series.IsCustomPropertySet("LineTension"))
					{
						this.lineTension = CommonElements.ParseFloat(series["LineTension"]);
					}
					bool flag2 = false;
					PointF[] points = null;
					if ((this.lineTension == 0f) && !common.ProcessModeRegions)
					{
						points = new PointF[series.Points.Count];
					}
					else
					{
						flag2 = true;
						points = this.GetPointsPosition(graph, series, indexedSeries);
						if (this.lineTension != 0f)
						{
							float num3 = 0.1f;
							for (int i = 1; i < points.Length; i++)
							{
								if (Math.Abs((float)(points[i - 1].X - points[i].X)) < num3)
								{
									if (points[i].X > points[i - 1].X)
									{
										points[i].X = points[i - 1].X + num3;
									}
									else
									{
										points[i].X = points[i - 1].X - num3;
									}
								}
								if (Math.Abs((float)(points[i - 1].Y - points[i].Y)) < num3)
								{
									if (points[i].Y > points[i - 1].Y)
									{
										points[i].Y = points[i - 1].Y + num3;
									}
									else
									{
										points[i].Y = points[i - 1].Y - num3;
									}
								}
							}
						}
					}
					if (points.Length > 1)
					{
						int pointIndex = 0;
						DataPoint point = null;
						double axisValue = 0.0;
						double num7 = 0.0;
						bool isValueShownAsLabel = series.IsValueShownAsLabel;
						bool flag4 = false;
						foreach (DataPoint point2 in series.Points)
						{
							flag4 = false;
							point2.positionRel = new PointF(float.NaN, float.NaN);
							if (!this._processBaseChart)
							{
								string markerImage = point2.MarkerImage;
								MarkerStyle markerStyle = point2.MarkerStyle;
								if (((base.alwaysDrawMarkers || (markerStyle != MarkerStyle.None)) || ((markerImage.Length > 0) || isValueShownAsLabel)) || (point2.IsValueShownAsLabel || (point2.Label.Length > 0)))
								{
									this._processBaseChart = true;
								}
							}
							double yValue = this.GetYValue(common, area, series, point2, pointIndex, base.YValueIndex);
							double logValue = indexedSeries ? ((double)(pointIndex + 1)) : point2.XValue;
							if (pointIndex != 0)
							{
								yValue = base.VAxis.GetLogValue(yValue);
								logValue = base.HAxis.GetLogValue(logValue);
								if (((((logValue <= this.hAxisMin) && (num7 < this.hAxisMin)) || ((logValue >= this.hAxisMax) && (num7 > this.hAxisMax))) || (((yValue <= this.vAxisMin) && (axisValue < this.vAxisMin)) || ((yValue >= this.vAxisMax) && (axisValue > this.vAxisMax)))) && !this.drawOutsideLines)
								{
									bool flag5 = true;
									if (common.ProcessModeRegions && ((pointIndex + 1) < series.Points.Count))
									{
										DataPoint point3 = series.Points[pointIndex + 1];
										double num10 = indexedSeries ? ((double)(pointIndex + 2)) : point3.XValue;
										if (((logValue < this.hAxisMin) && (num10 > this.hAxisMin)) || ((logValue > this.hAxisMax) && (num10 < this.hAxisMax)))
										{
											flag5 = false;
										}
										if (flag5 && (((yValue < this.vAxisMin) && (num10 > this.vAxisMin)) || ((yValue > this.vAxisMax) && (num10 < this.vAxisMax))))
										{
											flag5 = false;
										}
									}
									if (flag5)
									{
										pointIndex++;
										point = point2;
										axisValue = yValue;
										num7 = logValue;
										continue;
									}
								}
								this.clipRegionSet = false;
								if ((((this.lineTension != 0.0) || (num7 < this.hAxisMin)) || ((num7 > this.hAxisMax) || (logValue > this.hAxisMax))) || (((logValue < this.hAxisMin) || (axisValue < this.vAxisMin)) || (((axisValue > this.vAxisMax) || (yValue < this.vAxisMin)) || (yValue > this.vAxisMax))))
								{
									graph.SetClip(area.PlotAreaPosition.ToRectangleF());
									this.clipRegionSet = true;
								}
								if ((this.lineTension == 0f) && !flag2)
								{
									float linearPosition = 0f;
									float num12 = 0f;
									if (!flag4)
									{
										linearPosition = (float)base.VAxis.GetLinearPosition(axisValue);
										num12 = (float)base.HAxis.GetLinearPosition(num7);
										points[pointIndex - 1] = new PointF(num12 * num, linearPosition * num2);
									}
									linearPosition = (float)base.VAxis.GetLinearPosition(yValue);
									num12 = (float)base.HAxis.GetLinearPosition(logValue);
									points[pointIndex] = new PointF(num12 * num, linearPosition * num2);
									flag4 = true;
								}
								point2.positionRel = graph.GetRelativePoint(points[pointIndex]);
								graph.StartHotRegion(point2);
								if ((pointIndex != 0) && point.IsEmpty)
								{
									this.DrawLine(graph, common, point, series, points, pointIndex, this.lineTension);
								}
								else
								{
									this.DrawLine(graph, common, point2, series, points, pointIndex, this.lineTension);
								}
								graph.EndHotRegion();
								if (this.clipRegionSet)
								{
									graph.ResetClip();
								}
								point = point2;
								axisValue = yValue;
								num7 = logValue;
							}
							else
							{
								point = point2;
								axisValue = this.GetYValue(common, area, series, point2, pointIndex, 0);
								num7 = indexedSeries ? ((double)(pointIndex + 1)) : point2.XValue;
								axisValue = base.VAxis.GetLogValue(axisValue);
								num7 = base.HAxis.GetLogValue(num7);
								point2.positionRel = new PointF((float)base.HAxis.GetPosition(num7), (float)base.VAxis.GetPosition(axisValue));
							}
							if (pointIndex == 0)
							{
								this.DrawLine(graph, common, point2, series, points, pointIndex, this.lineTension);
							}
							pointIndex++;
						}
					}
					else if ((((points.Length == 1) && (series.Points.Count == 1)) && !this._processBaseChart) && (((base.alwaysDrawMarkers || (series.Points[0].MarkerStyle != MarkerStyle.None)) || ((series.Points[0].MarkerImage.Length > 0) || series.IsValueShownAsLabel)) || (series.Points[0].IsValueShownAsLabel || (series.Points[0].Label.Length > 0))))
					{
						this._processBaseChart = true;
					}
					points = null;
					if (!selection)
					{
						common.Chart.CallOnPostPaint(new ChartPaintEventArgs(series, graph, common, area.PlotAreaPosition));
					}
				}
			}
		}

		protected void ProcessLineChartType3D(bool selection, ChartGraphics graph, CommonElements common, ChartArea area, Series seriesToDraw)
		{
			graph.frontLinePen = null;
			graph.frontLinePoint1 = PointF.Empty;
			graph.frontLinePoint2 = PointF.Empty;
			List<string> seriesNamesList = null;
			if ((area.Area3DStyle.IsClustered && this.SideBySideSeries) || this.Stacked)
			{
				seriesNamesList = area.GetSeriesFromChartType(this.Name);
			}
			else
			{
				seriesNamesList = new List<string>();
				seriesNamesList.Add(seriesToDraw.Name);
			}
			foreach (string str in seriesNamesList)
			{
				Series series = common.DataManager.Series[str];
				if (!series.IsXValueIndexed)
				{
					bool flag = true;
					int num = 0x7fffffff;
					double naN = double.NaN;
					foreach (DataPoint point in series.Points)
					{
						if (flag && (point.XValue == 0.0))
						{
							continue;
						}
						flag = false;
						bool flag2 = true;
						if (!double.IsNaN(naN) && (point.XValue != naN))
						{
							if (num == 0x7fffffff)
							{
								num = (point.XValue > naN) ? 0 : 1;
							}
							if ((point.XValue > naN) && (num == 1))
							{
								flag2 = false;
							}
							if ((point.XValue < naN) && (num == 0))
							{
								flag2 = false;
							}
						}
						if (!flag2)
						{
							throw new InvalidOperationException(SR.Exception3DChartPointsXValuesUnsorted);
						}
						naN = point.XValue;
					}
					continue;
				}
			}
			ArrayList pointsArray = area.GetDataPointDrawingOrder(seriesNamesList, this, selection, this.COPCoordinatesToCheck, null, 0, false);
			this.lineTension = this.GetDefaultTension();
			if (pointsArray.Count > 0)
			{
				Series series2;
				series2 = series2 = ((DataPoint3D)pointsArray[0]).dataPoint.series;
				if (this.IsLineTensionSupported() && series2.IsCustomPropertySet("LineTension"))
				{
					this.lineTension = CommonElements.ParseFloat(series2["LineTension"]);
				}
			}
			this.allPointsLoopsNumber = this.GetPointLoopNumber(selection, pointsArray);
			for (int i = 0; i < this.allPointsLoopsNumber; i++)
			{
				int pointIndex = 0;
				this.centerPointIndex = 0x7fffffff;
				foreach (object obj2 in pointsArray)
				{
					DataPoint3D pointd = (DataPoint3D)obj2;
					DataPoint dataPoint = pointd.dataPoint;
					Series series3 = dataPoint.series;
					base.HAxis = area.GetAxis(AxisName.X, series3.XAxisType, series3.XSubAxisName);
					base.VAxis = area.GetAxis(AxisName.Y, series3.YAxisType, series3.YSubAxisName);
					this.hAxisMin = base.HAxis.ViewMinimum;
					this.hAxisMax = base.HAxis.ViewMaximum;
					this.vAxisMin = base.VAxis.ViewMinimum;
					this.vAxisMax = base.VAxis.ViewMaximum;
					if (pointd.index > 1)
					{
						int neighborPointIndex = pointIndex;
						DataPoint3D prevDataPointEx = ChartGraphics.FindPointByIndex(pointsArray, pointd.index - 1, this.multiSeries ? pointd : null, ref neighborPointIndex);
						GraphicsPath path = null;
						double yValue = this.GetYValue(common, area, series3, pointd.dataPoint, pointd.index - 1, 0);
						double logValue = this.GetYValue(common, area, series3, prevDataPointEx.dataPoint, prevDataPointEx.index - 1, 0);
						double num8 = pointd.indexedSeries ? ((double)pointd.index) : pointd.dataPoint.XValue;
						double num9 = prevDataPointEx.indexedSeries ? ((double)prevDataPointEx.index) : prevDataPointEx.dataPoint.XValue;
						yValue = base.VAxis.GetLogValue(yValue);
						logValue = base.VAxis.GetLogValue(logValue);
						num8 = base.HAxis.GetLogValue(num8);
						num9 = base.HAxis.GetLogValue(num9);
						DataPoint3D pointd3 = prevDataPointEx.dataPoint.IsEmpty ? prevDataPointEx : pointd;
						if (pointd3.dataPoint.Color != Color.Empty)
						{
							DrawingOperationTypes drawElement = DrawingOperationTypes.DrawElement;
							if (common.ProcessModeRegions)
							{
								drawElement |= DrawingOperationTypes.CalcElementPath;
							}
							this.showPointLines = false;
							if (pointd3.dataPoint.IsCustomPropertySet("ShowMarkerLines"))
							{
								if (string.Compare(pointd3.dataPoint["ShowMarkerLines"], "TRUE", StringComparison.OrdinalIgnoreCase) == 0)
								{
									this.showPointLines = true;
								}
							}
							else if (pointd3.dataPoint.series.IsCustomPropertySet("ShowMarkerLines") && (string.Compare(pointd3.dataPoint.series["ShowMarkerLines"], "TRUE", StringComparison.OrdinalIgnoreCase) == 0))
							{
								this.showPointLines = true;
							}
							graph.StartHotRegion(dataPoint);
							area.IterationCounter = 0;
							path = this.Draw3DSurface(area, graph, area.matrix3D, area.Area3DStyle.LightStyle, prevDataPointEx, pointd3.zPosition, pointd3.depth, pointsArray, pointIndex, i, this.lineTension, drawElement, 0f, 0f, new PointF(float.NaN, float.NaN), new PointF(float.NaN, float.NaN), false);
							graph.EndHotRegion();
						}
						if (common.ProcessModeRegions && (path != null))
						{
							common.HotRegionsList.AddHotRegion(path, false, graph, dataPoint, series3.Name, pointd.index - 1);
						}
						if (path != null)
						{
							path.Dispose();
						}
					}
					pointIndex++;
				}
			}
		}

		public override bool ApplyPaletteColorsToPoints
		{
			get
			{
				return false;
			}
		}

		public override bool DataPointsInLegend
		{
			get
			{
				return false;
			}
		}

		public override string Name
		{
			get
			{
				return "Line";
			}
		}

		public override bool RequireAxes
		{
			get
			{
				return true;
			}
		}

		public override bool SideBySideSeries
		{
			get
			{
				return false;
			}
		}

		public override bool Stacked
		{
			get
			{
				return false;
			}
		}

		public override bool SupportLogarithmicAxes
		{
			get
			{
				return true;
			}
		}

		public override bool SwitchValueAxes
		{
			get
			{
				return false;
			}
		}

		public override int YValuesPerPoint
		{
			get
			{
				return 1;
			}
		}

		public override bool ZeroCrossing
		{
			get
			{
				return true;
			}
		}
	}
}

